import turtle

turtle.ht()
turtle.colormode(255)
# 自变量
count = 0
# RGB值
red = 220
green = 100
blue = 0
x1 = 0
x2 = 100
x3 = -100
y1 = 0
y2 = 173
y3 = 173
while count < 9:
    turtle.fillcolor(red, green, blue)
    turtle.begin_fill()
    turtle.goto(x2, y2)
    turtle.goto(x3, y3)
    turtle.goto(x1, y1)
    turtle.end_fill()
    x2 -= 5
    y2 += 5
    x3 -= 5
    y3 += 5
    red -= 15
    green += 10
    blue += 22
    count += 1

turtle.done()
